<?php
/**
 * The List News Event
 * @package WordPress
 * @subpackage Arena Softech
 * @sinceArena Softech 1.0
 */
 //Get category by Id
		$cat_id_news_event = $get_option_arena_softech->arena_softech_get_id_news_event();
		$list_Cats = new WP_Query();
		
		// Get info category
		//var_dump(get_category( 10 ));
		$list_Cats->query('showposts=5&cat='.$cat_id_news_event);
		$list_Cats->query_vars['category__in'];
		//var_dump($list_Cats->query_vars['category__in']);

 ?>

<div class="wrapper">
         
            <ul class="tabs">
				<?php 
					foreach($list_Cats->query_vars['category__in'] as $set_id_Cat_news_event){
						if($set_id_Cat_news_event != $cat_id_news_event){
							$get_cat_news_event = get_category($set_id_Cat_news_event);
							$set_title_cat_news_event = $get_cat_news_event->name;
						$args_new_event=array(
						  'include' => $set_id_Cat_news_event,
						  'orderby' => 'name',
						  'order' => 'ASC'
						  );
						$get_count_cat_new_event = 0;
						$categories_new_event=get_categories($args_new_event);
						  foreach($categories_new_event as $category_new_event) {
								$get_count_cat_new_event += $category_new_event->count;
						  }
						  if($get_count_cat_new_event>0){
						  
				?>
				
				   <li><a href="#tab<?php echo $set_id_Cat_news_event;?>"><?php echo $set_title_cat_news_event ;?></a></li>
			   <?php }}}//End if, End for ;?>
            </ul>
            
            <div class="inner">
            	<div class="wrapper">
					<div class="tab_container">
						<?php 
							foreach($list_Cats->query_vars['category__in'] as $set_id_Cat_news_event){
								if($set_id_Cat_news_event != $cat_id_news_event){
								//$set_id_Cat_news_event = '18';
							$args_new_event=array(
							  'include' => $set_id_Cat_news_event,
							  'orderby' => 'name',
							  'order' => 'ASC'
							  );
							$get_count_cat_new_event = 0;
							$categories_new_event=get_categories($args_new_event);
							  foreach($categories_new_event as $category_new_event) {
									$get_count_cat_new_event += $category_new_event->count;
							  }
							  if($get_count_cat_new_event>0){
						?>
						<div id="tab<?php echo $set_id_Cat_news_event;?>" class="tab_content">
							<ul class="posts" id="tab_list_post">
								<?php 
									$set_list_max = '1';
									$getPost_news_event = new WP_Query();
									$getPost_news_event->query('showposts=3&cat='.$set_id_Cat_news_event);
									while($getPost_news_event->have_posts()) {
										$getPost_news_event->the_post();
										$theFeaturedImg = get_post_meta($post->ID, 'thumbnail', true);
										if($set_list_max =='1'){
									?>
										<li class="post-<?php the_ID()?>">
											  <strong><?php the_time(__('M d, Y', 'arena_softech')) ?></strong>
											  <b><a href="<?php the_permalink();?>"><?php the_title();?></a></b>
											 <?php if ($options['author']) : ?> <em>Post by <span class="author"><?php the_author_posts_link(); ?></span></em><?php endif; ?>
											  <div class="featured-thumbnail">
												<?php if(isset($theFeaturedImg) && $theFeaturedImg ==""){ ?>
													<img width="309" height="155"src="<?php echo bloginfo( 'template_directory' ); ?>/images/slider-1.jpg" class="attachment-slider-post-thumbnail wp-post-image" alt="slider-1" title="slider-1" />
												<?php } else { ?>
													<img width="309" height="155" src="<?php echo $theFeaturedImg; ?>" alt="Featured Image" class="attachment-slider-post-thumbnail wp-post-image" />
												<?php } ?>
											</div>  
											  <?php the_excerpt();?>
											  <p>
												 <!-- <span><a href="<?php the_permalink();?>#respond" class="comments-link"  title="Comment on Article">No comments</a></span>
												  <i><a href="<?php the_permalink();?>">Read more</a></i>-->
											  </p>
										   </li>
										   <li class="post-w12">
												<strong><?php echo'Article in categories';?></strong>
												<div class="list_post_inCat">
													<ul>
													   <?php 
															$set_list_max = '0';
													   }else {?>
																	<li class="post-<?php the_ID()?>">
																		<div class="info_post">
																			<div class="img_post">
																				<a href="<?php echo the_permalink();?>">
																					<?php if(isset($theFeaturedImg) && $theFeaturedImg ==""){ ?>
																						
																						<img width="100" height="80" src="<?php echo bloginfo( 'template_directory');?>/images/posts/1.jpg"/>
																					<?php } else { ?>
																						<img width="100" height="80" src="<?php echo $theFeaturedImg; ?>" alt="Featured Image" class="attachment-slider-post-thumbnail wp-post-image" />
																					<?php } ?>
																				</a>
																			</div>
																			<div class="content_post">
																				<h3><a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
																				<?php 
																					//$replace = array('<p>','</p>');
																					//$set_content =str_replace($replace,'',the_content());
																					the_excerpt();
																					//echo $set_content;
																				?>
																			</div>
																		</div>
																	</li>

															<?php }} ?>
													</ul>
												</div>
										</li>
									</ul>
						</div>
						<?php }}
						}//End if, End for ;?>						
						<!--<div id="tab2" class="tab_content">
							<ul class="posts">
								<li class="post-2">
									 <strong>Wednesday, 23 February 2011 9:19</strong>
									 <b><a href="">Maecenas eleifend tincidunt sem, sed fermentum</a></b>
									 <em>Posted by <span><a href="" title="Posts by admin">admin</a></span></em>
									 <div class="featured-thumbnail"><img width="309" height="155" src="<?php echo bloginfo( 'template_directory' ); ?>/images/picture-6.jpg" class="attachment-post-thumbnail wp-post-image" alt="picture-6" title="picture-6" /></div>                                 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequa...                                  <p><span><a href="http://cms.template-help.com/wordpress_32983/?features=maecenas-eleifend-tincidunt-sem-sed-fermentum#respond" class="comments-link"  title="Comment on Maecenas eleifend tincidunt sem, sed fermentum">No comments</a></span><i><a href="http://cms.template-help.com/wordpress_32983/?features=maecenas-eleifend-tincidunt-sem-sed-fermentum">Read more</a></i></p>
								</li>
								<li class="post-2">
									 <strong>Wednesday, 23 February 2011 9:18</strong>
									 <b><a href="">Nulla tincidunt pellentesque augue, quis accumsan est</a></b>
									 <em>Posted by <span><a href="" title="Posts by admin">admin</a></span></em>
									 <div class="featured-thumbnail"><img width="309" height="155" src="<?php echo bloginfo( 'template_directory' ); ?>/images/picture-5.jpg" class="attachment-post-thumbnail wp-post-image" alt="picture-5" title="picture-5" /></div>                                 Dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequa...                                  <p><span><a href="http://cms.template-help.com/wordpress_32983/?features=fusce-ut-feugiat-ligula#respond" class="comments-link"  title="Comment on Nulla tincidunt pellentesque augue, quis accumsan est">No comments</a></span><i><a href="http://cms.template-help.com/wordpress_32983/?features=fusce-ut-feugiat-ligula">Read more</a></i></p>
								</li>
							</ul>
						</div>
						-->
					</div>
               </div>
            </div>
         
         </div>
     